<!DOCTYPE HTML>
<html>
<body>
    Test for crbug.com/461151: This test passes if it does not crash.
    <svg>
        <feImage id="feImage"></feImage>
    </svg>
    <script>
        onload = function() {
            if (window.testRunner)
                testRunner.dumpAsText();
            feImage.setAttributeNS('http://www.w3.org/1999/xlink', 'xlink:href', '#doesnotexist');
            document.replaceChild(feImage, document.documentElement);
            feImage.setAttribute("xlink:href", "doesnotexist.svg");
        }
    </script>
</body>
</html>
